<!DOCTYPE html>
<html>
<head lang="en">
    <meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="{$Think.config.RESOURCEURL}wx_assets/css/common.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
    <link href="{$Think.config.RESOURCEURL}wx_assets/dist/gmu.css{$Think.config.RESOURCE_VER}" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.1.1.3.min.js{$Think.config.RESOURCE_VER}"></script>
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/dist/gmu.min.js{$Think.config.RESOURCE_VER}"></script>
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.alert.js{$Think.config.RESOURCE_VER}"></script>
    <script src="{$Think.config.RESOURCEURL}wx_assets/js/util.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/wx_share.js{$Think.config.RESOURCE_VER}"></script>
    <title>{$systemName}</title>
    <style>
        @font-face {
            font-family: 'iconfont';  /* project id 201523 */
            src: url('//at.alicdn.com/t/font_sym0ota7xs84zpvi.eot');
            src: url('//at.alicdn.com/t/font_sym0ota7xs84zpvi.eot?#iefix') format('embedded-opentype'),
            url('//at.alicdn.com/t/font_sym0ota7xs84zpvi.woff') format('woff'),
            url('//at.alicdn.com/t/font_sym0ota7xs84zpvi.ttf') format('truetype'),
            url('//at.alicdn.com/t/font_sym0ota7xs84zpvi.svg#iconfont') format('svg');
        }
        html{height:100%}
        body{
            background-image: url({$Think.config.RESOURCEURL}wx_assets/merchant/image/backimg.jpg{$Think.config.RESOURCE_VER});
            background-repeat: no-repeat;
            background-size: cover;
            height:100%;
        }
        .iconfont{
            font-family:iconfont;
        }
        .container{
            padding:0 10px;
        }
        .container .title{
            overflow: hidden;
            line-height: 50px;
            padding: 15px 0;
            font-size: 16px;
            color: #333;
            border-bottom:1px solid rgba(255,255,255,.7)
        }
        .container .title>img{
            width: 50px;
            height: 50px;
            float: left;
            border-radius: 50%;
            border: solid 3px #BB8549;
            box-sizing: border-box;
        }
        .container .title>h1{
            float: left;
            margin-left: 10px;
        }
        .container .title>span,.container .title>i{
            float: right;
            color: white;
        }
        .container .title>i{
            position: relative;
            top: 2px;
            margin-left:10px;
            color:#BB8549;
        }
        .container>ul{
            padding:0 10px;
        }
        .container>ul>li{
            width: 50%;
            display: inline-block;
        }
        .container>ul>li img{
            max-width: 60%;
            display: block;
            margin: 0 auto;
        }
        .container>ul>li>div{
            border-radius: 15px;
            height: 96px;
            width: 96px;
            box-shadow: 0 0 0 4px rgba(255,255,255,.5);
            margin: 20px auto;
            padding: 12px 0;
            text-align: center;
            font-size:16px;
            box-sizing: border-box;
            color:white;
        }
        .container>ul>li:nth-child(1)>div{
            background-color: #FEB101;
        }
        .container>ul>li:nth-child(2)>div{
            background-color: #33A9E7;
        }
        .container>ul>li:nth-child(3)>div{
            background-color: #B569FF;
        }
        .container>ul>li:nth-child(4)>div{
            background-color: #07A546;
        }
        .container>ul>li:nth-child(5)>div{
            background-color: #FA353E;
        }
        .container>ul>li:nth-child(6)>div{
            background-color: #FFDC20;
        }
        .container>ul>li>div>i{
            font-size: 40px;
            display: block;
        }
    </style>
</head>
<body <if condition="$wxBackImgUrl neq ''">style="background-image:url({$wxBackImgUrl})"</if>>
    <div class="container">
        <div class="title">
            <img src="{$logo}" />
            <h1>{$name}</h1>
            <if condition="$status eq 0">
                <i class="iconfont">&#xe675;</i>
                <span>(未提交)</span>
                <elseif condition="$status eq 1"/>
                <i class="iconfont">&#xe675;</i>
                <span>(等待认证)</span>
                <elseif condition="$status eq 4"/>
                <i class="iconfont">&#xe675;</i>
                <span>(认证已过期)</span>
                <elseif condition="$status eq 5"/>
                <i class="iconfont">&#xe675;</i>
                <span>(认证失败)</span>
                <elseif condition="$status eq 6"/>
                <i class="iconfont">&#xe675;</i>
                <span>(认证即将过期)</span>
            </if>
        </div>
        <ul>
            <volist name="wxMenu" id="menu">
                <li>
                    <if condition="$menu.url eq ''">
                        <div style="background-color:#ccc">
                            <img src="{$menu.iconurl}"/>
                            <span>{$menu.name}</span>
                        </div>
                        <elseif condition="$menu.name eq '门店' and $experienceAllowed eq 0 and $status neq 3"/>
                        <div style="background-color:#ccc">
                            <img src="{$menu.iconurl}"/>
                            <span>{$menu.name}</span>
                        </div>
                        <elseif condition="$menu.name eq '门店'"/>
                        <div onclick="jump('{$menu.url}')">
                            <img src="{$menu.iconurl}"/>
                            <span>{$menu.name}</span>
                        </div>
                        <elseif condition="$menu.name eq '证书' and $status neq 3"/>
                        <div style="background-color:#ccc">
                            <img src="{$menu.iconurl}"/>
                            <span>{$menu.name}</span>
                        </div>
                        <elseif condition="$menu.name eq '证书'"/>
                        <div onclick="jump('{$menu.url}')">
                            <img src="{$menu.iconurl}"/>
                            <span>{$menu.name}</span>
                        </div>
                    </if>

                </li>
            </volist>

        </ul>
    </div>
<script>
    function jump(url){
        location.href = url;
    }
    $(".title").click(function(){
        if('{$status}'==3){return;}
        location.href = '{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=merchant&method=getVerification&params=%7B%22id%22:{$id}%7D';
    });
    function getShareUrl(){
        var p=$.util.getParamAsObject();
        var shareUrl="";
        if(p&&(p.qId&& p.miUId)){
            p=encodeURIComponent(JSON.stringify(p));
            shareUrl='{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=merchant&method=index&params='+p;
        }else{
            var params={
                "qId":'{$qid}',
                "miUId":'{$uid}'
            };
            params=encodeURIComponent(JSON.stringify(params));
            shareUrl='{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=merchant&method=index&params='+params;
        }
        return shareUrl;
    }
</script>
<script>
    wx_share.init({
        "title":"{$systemName}",
        "desc":"{$systemName}邀请您注册",
        "link":getShareUrl(),
        "imgUrl": '{$shareImg}',
        "pkg":{
            "appId": '{$pkg.appId}',
            "timestamp": '{$pkg.timestamp}',
            "nonceStr": '{$pkg.nonceStr}',
            "signature": '{$pkg.signature}'
        },
        success:function(config,shareType){
        }
    });
</script>
</body>
</html>